home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_finalrmspikes.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  84 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_FinalRmSpikes.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13.     message     touched
  14.     
  15.     thing       player      local
  16.     thing       deadIndy    local
  17.     
  18.     thing       spike0      linkID=1
  19.     thing       spike1      linkID=1
  20.     thing       spike2      linkID=1
  21.     thing       spike3      linkID=1
  22.     thing       spike4      linkID=1
  23.     thing       spike5      linkID=1
  24.     thing       spike6      linkID=1
  25.     thing       spike7      linkID=1
  26.     
  27.     surface     surf0       linkID=1
  28.     
  29.     sound       sndDie=tem_temspikes_up_kill_c.wav      local
  30.     sound       say_Ugh=inxj018a.wav                    local
  31.     
  32.     template    tpl_Indy=indy_sh_actor          local
  33.  
  34.     keyframe    inDie=in_die_buckle.key         local
  35.  
  36.     int         deadMan=0       local
  37.     int         victim          local
  38.     int         i               local
  39.     int         spikes=8        local
  40.     
  41. end
  42.  
  43. # ========================================================================================
  44.  
  45. code
  46.  
  47. touched:
  48.  
  49.     player = GetLocalPlayerThing();
  50.  
  51.     if((GetSenderID() == 1) && (deadMan == 0))
  52.     {
  53.         deadMan = 1;
  54.         
  55.         for(i=0; i<spikes; i=i+1)                                                                        
  56.         {            
  57.             SetCollideType(spike0[i], 0);
  58.         }
  59.         
  60.         DamageThing(player, 1000.0, 0x1, victim);
  61.         Sleep(0.1);
  62.         
  63.         PlaySoundLocal(sndDie, 1.0, 0.0, 0x0, 0);
  64.         PlaySoundLocal(say_Ugh, 1.0, 0.0, 0x0, 0);
  65.                             
  66.         # hide player
  67.         SetThingFlags(player, 0x80000);
  68.         
  69.         # create actor indy
  70.         deadIndy = CreateThing(tpl_Indy, player);
  71.         CaptureThing(deadIndy);
  72.                             
  73.         # Show actor Indy and play Keyframe
  74.         ClearThingFlags(deadIndy, 0x80000);
  75.         PlayKey(deadIndy, inDie, 4, 0x14, 0);
  76.     }
  77.  
  78.     return;
  79.     
  80. # ========================================================================================
  81.         
  82. end
  83.  
  84.